﻿using Basic.FormCollect.Model;
using WeDonekRpc.SqlSugar.VirtualQuery;

namespace Basic.UserFormService.Model
{
    public class DataTableBody
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 页面ID
        /// </summary>
        public long PageId { get; set; }

        /// <summary>
        /// 表单ID
        /// </summary>
        public long FormId { get; set; }

        public long TableId { get; set; }
        /// <summary>
        /// 查询条件
        /// </summary>
        public QueryStruct Query { get; set; }

        public PhyExtendCol[] ExtendCol
        {
            get;
            set;
        }

        public Dictionary<long, ColTable> Cols { get; set; }

        public DataTableBody Clone ()
        {
            return new DataTableBody
            {
                Cols = this.Cols,
                FormId = this.FormId,
                TableId = this.TableId,
                ExtendCol = this.ExtendCol,
                Id = this.Id,
                PageId = this.PageId,
                Query = this.Query.Clone()
            };
        }
    }

}